package com.zzx.facade.manager;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.zzx.common.facade.bean.OrderInfoDTO;
import com.zzx.common.facade.manager.OrderManager;
import com.zzx.common.service.component.OrderComponent;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
@Service
public class OrderManagerImpl implements OrderManager {

    @Reference
    private OrderComponent orderComponent;

    @Override
    public OrderInfoDTO getInfo(String id) {
        OrderInfoDTO orderInfoDTO = new OrderInfoDTO();
        BeanUtils.copyProperties(orderComponent.getInfo(id),orderInfoDTO);
        return orderInfoDTO;
    }
}
